cmake_minimum_required(VERSION 3.14)
project(cpp-tbox_sample)

find_package(ament_cmake REQUIRED)
find_package(cpp-tbox_vendor REQUIRED)
find_package(rclcpp REQUIRED)
find_package(example_interfaces REQUIRED)

add_definitions(-DMODULE_ID="${PROJECT_NAME}")
add_link_options(-rdynamic)

add_executable(
  ${PROJECT_NAME}
  src/apps.cpp
  src/build_time.cpp
  src/main.cpp
  src/your/app.cpp
  src/your/app_shell.cpp
  src/your/ros_bridge.cpp
  src/other/app.cpp
)

add_custom_target(build_time ALL COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/src/build_time.cpp)

install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin/${PROJECT_NAME})
install(DIRECTORY config DESTINATION share/${PROJECT_NAME})

ament_target_dependencies(
  ${PROJECT_NAME}
  cpp-tbox_vendor
  rclcpp
  std_msgs
  example_interfaces
)
